from processData import processData
import os

dirlist = os.listdir("sourcedata")
for filename in dirlist:
    if filename.endswith("raw.json"):
        the_id = filename[:-9]
        try:
            processData(the_id)
            os.system("touch sourcedata/" + the_id + "_finished")
        except:
            os.system("touch sourcedata/" + the_id + "_canceled")
            continue
